import Array._

object MultiDimensionsArray{
	def main(args:Array[String]){
		var myMatrix = ofDim[Int](3,3)
		
		//初始化，数字默认是0，引用类型默认是null
		for(i <- 0 to 2){
		  for(j <- 0 to 2){
		  	myMatrix(i)(j) = j
		  }		
		}

		//输出
		for(i <- 0 to 2){
		  for(j <- 0 to 2){
		  	print(" "+myMatrix(i)(j));
		  }		
		  println();
		}
		
	}
}
